Dynomotion

Group: DynoMotion Message: 7332 From: cristian_atzori Date: 4/27/2013
Subject: SWE, axis enable, Mach3 watchdog questions.
Hi again, I made some big steps ahead with my Kflop+Kanalog+Mach3 configuration and the machining center is moving correctly, but I've some issues with security control I wish to solve, in some way.

1st) My DC brusheds motor give a direct feedback to the drivers with a tacheometer, and I can't remove that from the driver input since the motors would runaway. Also, if Kflop is not servoing, when I power up the drivers I can see a slight runaway, at very low speed.
This is a big issue, since when Kflop disables an axis (max error, homing etc..) the drive is left on his own dealing with the motor.

2nd) Assumed that, is it possible to activate an output on JP8 when one, or any, of the axis are disabled? This way I'll be sure that in case of errors my motors won't run away.
Do you have any suggestion on how to deal with this behavior?

3rd) I'm using Mach3 as control software, and I put a line in the init.c program to enable bit 159, in order to give power to the drivers only when Mach3 is loaded. Also I followed some old discussions requiring to disable a bit when Mach3 is UNloaded. You usually ended stating that Mach3 and his chargepump, and anyway a pc with Windows, are not valid platforms to rely on with such kind of securities.
So, what can I do now to disable a bit in Kanalog when Mach3 is offline? Did you enabled some other kind of functionalities in Kflop firmware that allow any kind of feedback or notification in that cases?


btw: is it ok to put in the init.c program, so in a single thread, this configurations?
- axis parameters
- soft limits
- MPG control (using the default C found here, not already tested in Mach3)


Thank you for reading.

C.L. Atzori
Group: DynoMotion Message: 7336 From: cristian_atzori Date: 4/27/2013
Subject: Re: SWE, axis enable, Mach3 watchdog questions.
This is what I need to solve first: how to change a Bit state when one or more axis are disabled?

--- In DynoMotion@yahoogroups.com, "cristian_atzori" <cristian_atzori@...> wrote:
>
> Hi again, I made some big steps ahead with my Kflop+Kanalog+Mach3 configuration and the machining center is moving correctly, but I've some issues with security control I wish to solve, in some way.
>
> 1st) My DC brusheds motor give a direct feedback to the drivers with a tacheometer, and I can't remove that from the driver input since the motors would runaway. Also, if Kflop is not servoing, when I power up the drivers I can see a slight runaway, at very low speed.
> This is a big issue, since when Kflop disables an axis (max error, homing etc..) the drive is left on his own dealing with the motor.
>
> 2nd) Assumed that, is it possible to activate an output on JP8 when one, or any, of the axis are disabled? This way I'll be sure that in case of errors my motors won't run away.
> Do you have any suggestion on how to deal with this behavior?
>
> 3rd) I'm using Mach3 as control software, and I put a line in the init.c program to enable bit 159, in order to give power to the drivers only when Mach3 is loaded. Also I followed some old discussions requiring to disable a bit when Mach3 is UNloaded. You usually ended stating that Mach3 and his chargepump, and anyway a pc with Windows, are not valid platforms to rely on with such kind of securities.
> So, what can I do now to disable a bit in Kanalog when Mach3 is offline? Did you enabled some other kind of functionalities in Kflop firmware that allow any kind of feedback or notification in that cases?
>
>
> btw: is it ok to put in the init.c program, so in a single thread, this configurations?
> - axis parameters
> - soft limits
> - MPG control (using the default C found here, not already tested in Mach3)
>
>
> Thank you for reading.
>
> C.L. Atzori
>
Group: DynoMotion Message: 7338 From: Tom Kerekes Date: 4/27/2013
Subject: Re: SWE, axis enable, Mach3 watchdog questions.
Hi Cristian,

See the watchenables_disableall.c example.

Regards
TK

Group: DynoMotion Message: 7340 From: cristian_atzori Date: 4/27/2013
Subject: Re: SWE, axis enable, Mach3 watchdog questions.
Thank you Tom, I checked the whatchenables and found a usefull hint in whatchenables.c

Please tell me if would it be correct to insert this in the Init.c:


{
for (;;) //loop forever
{
WaitNextTimeSlice();

if (ch0->Enable)
SetBit(152);
else
ClearBit(152);

if (ch1->Enable)
SetBit(153);
else
ClearBit(153);


if (ch2->Enable)
SetBit(154);
else
ClearBit(154);
}
}

I would create an NC series with bits 152, 153, 154 and SWE. I'll use dual channel relais and use the second channel of each relay as NO to light up an error light.
This way I can disable my power line (controlled by SWE) and see exactly wich axis had troubles, even if Mach3 crashed.

Also, could it be possibile to use this form (I'll enable bits 152,153,154 in other sections of init.c):



{
for (;;) //loop forever
{
WaitNextTimeSlice();

if (ch0->Disable)
ClearBit(152);

if (ch1->Disable)
ClearBit(153);


if (ch2->Disable)
ClearBit(154);
}
}


Thank you for your precious support.
C.L.


--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Cristian,
>
> See the watchenables_disableall.c example.
>
> Regards
> TK
>
>
>
>
> ________________________________
> From: cristian_atzori <cristian_atzori@...>
> To: DynoMotion@yahoogroups.com
> Sent: Saturday, April 27, 2013 1:18 PM
> Subject: [DynoMotion] Re: SWE, axis enable, Mach3 watchdog questions.
>
>
>
>  
> This is what I need to solve first: how to change a Bit state when one or more axis are disabled?
>
> --- In DynoMotion@yahoogroups.com, "cristian_atzori" <cristian_atzori@> wrote:
> >
> > Hi again, I made some big steps ahead with my Kflop+Kanalog+Mach3 configuration and the machining center is moving correctly, but I've some issues with security control I wish to solve, in some way.
> >
> > 1st) My DC brusheds motor give a direct feedback to the drivers with a tacheometer, and I can't remove that from the driver input since the motors would runaway. Also, if Kflop is not servoing, when I power up the drivers I can see a slight runaway, at very low speed.
> > This is a big issue, since when Kflop disables an axis (max error, homing etc..) the drive is left on his own dealing with the motor.
> >
> > 2nd) Assumed that, is it possible to activate an output on JP8 when one, or any, of the axis are disabled? This way I'll be sure that in case of errors my motors won't run away.
> > Do you have any suggestion on how to deal with this behavior?
> >
> > 3rd) I'm using Mach3 as control software, and I put a line in the init.c program to enable bit 159, in order to give power to the drivers only when Mach3 is loaded. Also I followed some old discussions requiring to disable a bit when Mach3 is UNloaded. You usually ended stating that Mach3 and his chargepump, and anyway a pc with Windows, are not valid platforms to rely on with such kind of securities.
> > So, what can I do now to disable a bit in Kanalog when Mach3 is offline? Did you enabled some other kind of functionalities in Kflop firmware that allow any kind of feedback or notification in that cases?
> >
> >
> > btw: is it ok to put in the init.c program, so in a single thread, this configurations?
> > - axis parameters
> > - soft limits
> > - MPG control (using the default C found here, not already tested in Mach3)
> >
> >
> > Thank you for reading.
> >
> > C.L. Atzori
> >
>
Group: DynoMotion Message: 7341 From: cristian_atzori Date: 4/27/2013
Subject: Re: SWE, axis enable, Mach3 watchdog questions.
Sorry for the wrong syntax, I intended this:

{
for (;;) //loop forever
{
WaitNextTimeSlice();

if (ch0->Enable) //if X is disabled turns off bit 152 (jp8)
;
else
ClearBit(152);

if (ch1->Enable) //if Y is disabled turns off bit 153 (jp8)
;
else
ClearBit(153);


if (ch2->Enable) //if Z is disabled turns off il bit 154 (jp8)
;
else
ClearBit(154);
}
}

Thank you



--- In DynoMotion@yahoogroups.com, "cristian_atzori" <cristian_atzori@...> wrote:
>
> Thank you Tom, I checked the whatchenables and found a usefull hint in whatchenables.c
>
> Please tell me if would it be correct to insert this in the Init.c:
>
>
> {
> for (;;) //loop forever
> {
> WaitNextTimeSlice();
>
> if (ch0->Enable)
> SetBit(152);
> else
> ClearBit(152);
>
> if (ch1->Enable)
> SetBit(153);
> else
> ClearBit(153);
>
>
> if (ch2->Enable)
> SetBit(154);
> else
> ClearBit(154);
> }
> }
>
> I would create an NC series with bits 152, 153, 154 and SWE. I'll use dual channel relais and use the second channel of each relay as NO to light up an error light.
> This way I can disable my power line (controlled by SWE) and see exactly wich axis had troubles, even if Mach3 crashed.
>
> Also, could it be possibile to use this form (I'll enable bits 152,153,154 in other sections of init.c):
>
>
>
> {
> for (;;) //loop forever
> {
> WaitNextTimeSlice();
>
> if (ch0->Disable)
> ClearBit(152);
>
> if (ch1->Disable)
> ClearBit(153);
>
>
> if (ch2->Disable)
> ClearBit(154);
> }
> }
>
>
> Thank you for your precious support.
> C.L.
>
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Cristian,
> >
> > See the watchenables_disableall.c example.
> >
> > Regards
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: cristian_atzori <cristian_atzori@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Saturday, April 27, 2013 1:18 PM
> > Subject: [DynoMotion] Re: SWE, axis enable, Mach3 watchdog questions.
> >
> >
> >
> >  
> > This is what I need to solve first: how to change a Bit state when one or more axis are disabled?
> >
> > --- In DynoMotion@yahoogroups.com, "cristian_atzori" <cristian_atzori@> wrote:
> > >
> > > Hi again, I made some big steps ahead with my Kflop+Kanalog+Mach3 configuration and the machining center is moving correctly, but I've some issues with security control I wish to solve, in some way.
> > >
> > > 1st) My DC brusheds motor give a direct feedback to the drivers with a tacheometer, and I can't remove that from the driver input since the motors would runaway. Also, if Kflop is not servoing, when I power up the drivers I can see a slight runaway, at very low speed.
> > > This is a big issue, since when Kflop disables an axis (max error, homing etc..) the drive is left on his own dealing with the motor.
> > >
> > > 2nd) Assumed that, is it possible to activate an output on JP8 when one, or any, of the axis are disabled? This way I'll be sure that in case of errors my motors won't run away.
> > > Do you have any suggestion on how to deal with this behavior?
> > >
> > > 3rd) I'm using Mach3 as control software, and I put a line in the init.c program to enable bit 159, in order to give power to the drivers only when Mach3 is loaded. Also I followed some old discussions requiring to disable a bit when Mach3 is UNloaded. You usually ended stating that Mach3 and his chargepump, and anyway a pc with Windows, are not valid platforms to rely on with such kind of securities.
> > > So, what can I do now to disable a bit in Kanalog when Mach3 is offline? Did you enabled some other kind of functionalities in Kflop firmware that allow any kind of feedback or notification in that cases?
> > >
> > >
> > > btw: is it ok to put in the init.c program, so in a single thread, this configurations?
> > > - axis parameters
> > > - soft limits
> > > - MPG control (using the default C found here, not already tested in Mach3)
> > >
> > >
> > > Thank you for reading.
> > >
> > > C.L. Atzori
> > >
> >
>
Group: DynoMotion Message: 7351 From: Tom Kerekes Date: 4/28/2013
Subject: Re: SWE, axis enable, Mach3 watchdog questions.
Hi Christian,

That should work.  But the normal way to check for the opposite condition would be to use the "not" operator which is '!'.

Such as:

if (!ch0->Enable) //if X is not enabled turn off bit 152 (jp8)
     ClearBit(152);


Regards
TK

Group: DynoMotion Message: 7358 From: cristian_atzori Date: 4/28/2013
Subject: Re: SWE, axis enable, Mach3 watchdog questions.
Thank you Tom, I'll try that code in the next days. and see what happens to the motion during homing and soft-limits.

Best regards
C.L.Atzori



--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Christian,
>
> That should work.  But the normal way to check for the opposite condition would be to use the "not" operator which is '!'.
>
> Such as:
>
>
> if (!ch0->Enable) //if X is not enabled turn off bit 152 (jp8)
>     
> ClearBit(152);
>
>
> Regards
> TK
>
>
>
> ________________________________
> From: cristian_atzori <cristian_atzori@...>
> To: DynoMotion@yahoogroups.com
> Sent: Saturday, April 27, 2013 3:25 PM
> Subject: [DynoMotion] Re: SWE, axis enable, Mach3 watchdog questions.
>
>
>
>  
> Sorry for the wrong syntax, I intended this:
>
> {
> for (;;) //loop forever
> {
> WaitNextTimeSlice();
>
> if (ch0->Enable) //if X is disabled turns off bit 152 (jp8)
> ;
> else
> ClearBit(152);
>
> if (ch1->Enable) //if Y is disabled turns off bit 153 (jp8)
> ;
> else
> ClearBit(153);
>
> if (ch2->Enable) //if Z is disabled turns off il bit 154 (jp8)
> ;
> else
> ClearBit(154);
> }
> }
>
> Thank you
>
> --- In DynoMotion@yahoogroups.com, "cristian_atzori" <cristian_atzori@> wrote:
> >
> > Thank you Tom, I checked the whatchenables and found a usefull hint in whatchenables.c
> >
> > Please tell me if would it be correct to insert this in the Init.c:
> >
> >
> > {
> > for (;;) //loop forever
> > {
> > WaitNextTimeSlice();
> >
> > if (ch0->Enable)
> > SetBit(152);
> > else
> > ClearBit(152);
> >
> > if (ch1->Enable)
> > SetBit(153);
> > else
> > ClearBit(153);
> >
> >
> > if (ch2->Enable)
> > SetBit(154);
> > else
> > ClearBit(154);
> > }
> > }
> >
> > I would create an NC series with bits 152, 153, 154 and SWE. I'll use dual channel relais and use the second channel of each relay as NO to light up an error light.
> > This way I can disable my power line (controlled by SWE) and see exactly wich axis had troubles, even if Mach3 crashed.
> >
> > Also, could it be possibile to use this form (I'll enable bits 152,153,154 in other sections of init.c):
> >
> >
> >
> > {
> > for (;;) //loop forever
> > {
> > WaitNextTimeSlice();
> >
> > if (ch0->Disable)
> > ClearBit(152);
> >
> > if (ch1->Disable)
> > ClearBit(153);
> >
> >
> > if (ch2->Disable)
> > ClearBit(154);
> > }
> > }
> >
> >
> > Thank you for your precious support.
> > C.L.
> >
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Cristian,
> > >
> > > See the watchenables_disableall.c example.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: cristian_atzori <cristian_atzori@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Saturday, April 27, 2013 1:18 PM
> > > Subject: [DynoMotion] Re: SWE, axis enable, Mach3 watchdog questions.
> > >
> > >
> > >
> > >  
> > > This is what I need to solve first: how to change a Bit state when one or more axis are disabled?
> > >
> > > --- In DynoMotion@yahoogroups.com, "cristian_atzori" <cristian_atzori@> wrote:
> > > >
> > > > Hi again, I made some big steps ahead with my Kflop+Kanalog+Mach3 configuration and the machining center is moving correctly, but I've some issues with security control I wish to solve, in some way.
> > > >
> > > > 1st) My DC brusheds motor give a direct feedback to the drivers with a tacheometer, and I can't remove that from the driver input since the motors would runaway. Also, if Kflop is not servoing, when I power up the drivers I can see a slight runaway, at very low speed.
> > > > This is a big issue, since when Kflop disables an axis (max error, homing etc..) the drive is left on his own dealing with the motor.
> > > >
> > > > 2nd) Assumed that, is it possible to activate an output on JP8 when one, or any, of the axis are disabled? This way I'll be sure that in case of errors my motors won't run away.
> > > > Do you have any suggestion on how to deal with this behavior?
> > > >
> > > > 3rd) I'm using Mach3 as control software, and I put a line in the init.c program to enable bit 159, in order to give power to the drivers only when Mach3 is loaded. Also I followed some old discussions requiring to disable a bit when Mach3 is UNloaded. You usually ended stating that Mach3 and his chargepump, and anyway a pc with Windows, are not valid platforms to rely on with such kind of securities.
> > > > So, what can I do now to disable a bit in Kanalog when Mach3 is offline? Did you enabled some other kind of functionalities in Kflop firmware that allow any kind of feedback or notification in that cases?
> > > >
> > > >
> > > > btw: is it ok to put in the init.c program, so in a single thread, this configurations?
> > > > - axis parameters
> > > > - soft limits
> > > > - MPG control (using the default C found here, not already tested in Mach3)
> > > >
> > > >
> > > > Thank you for reading.
> > > >
> > > > C.L. Atzori
> > > >
> > >
> >
>